          <!-- START OF MAINCOL -->
          <div class="MainCol AddEbookPage">
          	  <h1>编辑分类</h1>
              <span class="NormalFont SmallFont">
                  <?= CHtml::image(Yii::app()->baseUrl.'/images/home_icon.gif', '主页'); ?> > 文章管理 > 编辑分类
               </span><br /><br />
              <div class="Titlebox box"><!-- DON'T DELETE --></div>
              
              <?= CHtml::form('', 'POST', array('name' => 'form1', 'enctype' => 'multipart/form-data')); ?>
              <div class="Smallbox"><label>分类名称<span class="Red">*</span></label>
                  <?= CHtml::textField('name', isset($category) ? $category->terms->name : '', array('class' => 'TxtInput')); ?>
              </div>

              <div class="Smallbox"><label>图片</label>
              <?= CHtml::activeFileField($categoryPic, 'categoryPic', array('class' => 'SmallerBox', 'size' => '32')); ?>
              </div>
				
				<?php if($category->categoryPic !== null) : ?>
              <div class="Smallbox"><label>&nbsp;</label>
	          <?= CHtml::image(TermsTaxonomyMeta::categoryPicUrl($category->categoryPic->metaValue)); ?>              
              </div>
              <?php endif; ?>
              
              <div class="Smallbox"><label>&nbsp;</label>
                  <p class="Smallerbox NormalFont SmallFont">图像尺寸 (像素) : 135 x 90<br />图像格式 : JPG, GIF, PNG</p>
              </div>
              
              <div class="Smallbox"><label>头条文章ID</label>
                  <?= CHtml::textField('topPost', isset($category->topPost) ? $category->topPost->metaValue : '', array('class' => 'TxtInput')); ?>
              </div>
              
              <div class="Midbox Red SmallFont">带 * 为必填项</div>

              <div class="Smallbox btnBox"><label>&nbsp;</label>
              	  <?= CHtml::submitButton('保存', array('title' => '保存', 'name' => 'submitPost')); ?>
                  或 <?= CHtml::link('返回', array('admin/posts/categories')); ?>
                  <br class="clear" />
              </div>
              <?= CHtml::endForm(); ?>

          </div>
          <!-- END OF MAINCOL -->